merge the vailable networks code and previous master code