a door is opened and closed