#6 Added support for testing directions
#7 Fixed bug