meta programming base refactored