python modularization, encapsulate playhead tick