refactoring of netctlinteract