moved network in front

large scale improvement at first