changed animation to be js based