update title accordingly