a little more refactoring and a minor API change