Rewrote using enumerators and list of doors