Comparative study of LEACH, LEACH-C and PEGASIS routing protocols for wireless sensor network