Change from self timing frames to use arguments for function