simplified the interface by removing one callback function (not really useful)