add function open and close door