a door is closed and opened