added gevent compatibility and prime function to XCaliburD