write functions for sidebarPanel UI