Wireless Sensor Networks (WSNs) is a networks of thousands of inexpensive miniature devices capable of computation, communication and sensing. WSN is being been attracting increasing interest for supporting a new generation of ubiquitous computing systems with great potential for many applications such as surveillance, environmental monitoring, health care monitoring or home automation. In the near future, wireless sensor network is expected to consists of thousand of inexpensive nodes, each having sensing capability with limited computational and communication power which enables to deploy large scale sensor networks. Large scale WSN is usually implemented as a cluster network. Clustering sensors into groups, so that sensors communicate information only to cluster-heads and then the cluster-heads communicate the aggregated information to the base station, saves energy and thus prolongs network lifetime. LEACH (Low Energy Adaptive Clustering Hierarchy) protocol is one of the clustering routing protocols in wireless sensor networks. The advantage of LEACH is that each node has the equal probability to be a cluster head, which makes the energy dissipation of each node be relatively balanced. In LEACH protocol, time is divided into many rounds, in each round, all the nodes contend to be cluster head according to a predefined criterion. This paper focuses on how to set the time length of each round, how to adjust threshold based on the residual energy, and the measurement of energy required for transmission, based on the distance of cluster head from the base station, to prolong the lifetime of the network and increase throughput, which is denoted as the amount of data packs sent to the sink node. The functions of residual energy and required energy, and the time length of each round are deduced, thereby modifying the threshold value calculation. These functions can be used to enhance the performance of cluster-based wireless sensor networks in terms of lifetime and throughput.