better implementation of the time code edit