more work on the helper functions