Designing a fall detection system for elderly