Add Leach algorithm and implement part of it