add panel controller - cleaner code