added the functionality to handle the styles at keyframes