added almost finished sidebar functionality