work toward fixing issue #18 and simultaneous refactoring
export using latest (best) code