fixed animations, will work for now, but still a little buggy.
merging animation code