changed the response write data to include complete return data object