Changed own way of generating network