Create set title function