changing over from js animation to css transition