Refactoring - removing duplicate code for picking doors