rewrite animation stuff, this seems nicer