Investigation of Clustering Algorithms Used in Wireless Sensor Networks