remove duplicate code and update top bar