update title fuction