inputTitles function 2