cleaned up RELIC module