added partial sidebar logic and formatting