created sidebar functionality