Added a function in door