cleaned code of network view