a little more refactoring to the original helper code