move time frames method to the code