added branch test
added direction tests