checkLetter function update

fixed some aspects of function that did not do what supposed to(find
function of string)