refactor statusbar