improved the calc method which is responsible of the time diff