Changed "place is valid" function