re-re-refactoring to properly match the original API interface. derp.