move factory and prefix to helpers