expanded on Hunt-and-Kill algo