Added a titleCase function