added comments and null pointer check to the while loop option of the DataReceiver event loop