Malicious Node Detection and Deletion in Energy Efficient Wireless Sensor Networks