moved thecreateResponse() to its own class since it's getting big.