need to be debugged in integration function