refactor and fix for start_time