Nowadays, smartphone devices have become very important in our daily life. We carry them everywhere and anytime. This strong dependency has encouraged mobile application developers to develop a wide variety of mobile applications. However, the limitations of smartphone hardware, such as limited processing capacity and limited battery life have become a barrier in front of apps developers. On the other hand, cloud computing is changing the style of delivering IT services. Mobile cloud computing uses the cloud to overcome the mobile device limitations. Many works have been conducted to extend mobile capabilities by offloading intensive application codes to the cloud. However, they did not consider realistic data that dynamically changing in user environment such as processors load, battery level, network bandwidth, etc. in offloading decision. Therefore, this paper aims to propose a new approach that uses realistic data from the user real environment to decide at runtime whether to offload code or not. Our experimental results show that our approach reduces the execution time and battery consumption compared to other approaches that do not take into consideration mobile device condition data.