side bar logic