added class factory for xBehaviors library