refactor the mobilnetwork code