created untested code that could detect a door!