Working on server read loop