added function to home panel. better design in view panel