use function declarations across migrator.js