Added HK algorithm