added wall checking 3/25/14