taylor's code for recieving data