Added function writeRequest
Added function hasNewData