Designing a system for safety and fire prevention