refactored document response