simplified sidebar code