added checking directions