changed default animation to 0 and cleaned up code