add direction to animation