add ball movement by direction logic