Optimizing Indoor Tracking System for Wireless Sensor Networks Using ZigBee