redid network client so it is a class. still having issues with the while loops