method get direction returns an array