created HSAW algo n stuff