design and construction of an occupancy detection system