added format time from milliseconds function