fixed functions so that actual piece object is passed
added direction enum