rewrite doors to be modular