switched to using css transform for smoother animation