Added strToTitleCase function