formatting and limit time to 30 seconds