add animation frame handling