added writeDataResponse