my %offset = ('n' => [0, 1], 's' => [0, -1], 'e' => [1, 0], 'w' => [-1, 0]);