fix sidebar
pagination working, refactor needed