A wireless sensor network is a new kind of wireless Ad-Hoc network consisting of a large number of small low cost, power constrained sensors deployed in a large area for gathering information for a large variety of applications. Since sensors are power constrained devices, it is quite important to organize them in some fashion in order to minimize total energy consumption in communication with base station. Clustering sensors into groups, so that sensors communicate information only to respective cluster heads and then cluster heads communicate the aggregated information to the processing center, is such an approach. In this paper, we propose an algorithm to organize sensors into clusters, which tries to extend the lifetime of network by forming balanced clusters as well as minimizing the total energy consumed in communication. In our algorithm, the number of hops is not fixed; rather it depends upon the spatial location of sensors.