Added code to network handler