create function to convert string to title case