moved forbidden area checking to a method