moving frame advancement to update()