added collapse function to sidebar