refactor mutations and network operations