add time controll and fix pausing time