Added method to build a response for an operation