Changed Algorithm

algorithm returns true if KW is found and false Otherwise