refactor keyframes