worked on integration. Trying to implement a adaptive method