An Energy Conserving Routing Algorithm for Wireless Sensor Networks