Changed the network code to be more precise