changing animation class structure