added door and time functionality