removed unnecessary repetition in integrate method