door detection written. Added pictures to illustrate what the function does
I don't know why I would delete it... Oh well