working on finalize_times