test
fixed references to directions as int instea of bool