full primary panel support added; refactoring