completed sidebar functionality