refactored controller panel code into a class