add improve the function setTitle