moved functionality to run
WIP: finish up modularization