added trigger for switching keyframes