move and merge all directions