factoring out control bar component