changing animation direction