refactor to keep DRY, lots of support for options overrides