added time calculation function. Added more functions to the shape class