convert grid to arrows