move response from inlined code to external resource