refactor the title bar