moved animate to prototype