In nameCompare, take percentage as a argument and instead of print, yield the result.