Updated title function