refactor interface to be close to that of MRJob