Cluster-Head Selection Algorithm to Enhance Energy-Efficiency and Reliability of Wireless Sensor Networks