code refactoring + start implement door tool