add control bar logic