refactors macro runtimes