profiled and removed sorts in find unique and scan string of whole file