networkstate code moved to remote and run dynamically