refactored meta;
refactored detect_theories