made partial for sidebar and refactored more in ctrl