time calculation added