receives data from server