changed interface, fixed a bug: integral