refactor generateResults to be imported/called