refactor the response creation to the base