move panels functional to the separate class