added pirtrait functionality (partially)