Used enum for direction instead of hard-coded ints