separate run and config blocks into different modules for easier testing