updated script to round time