The document proposes a new method to increase the lifetime of wireless sensor networks. It divides the sensor network environment into two virtual layers based on distance from the base station. It then uses residual energy, distance from base station, and position in the layers as factors in selecting cluster heads. Simulations show the proposed method outperforms LEACH and ELEACH algorithms in both homogeneous and heterogeneous sensor energy environments.