now using createResult() with responseCode parameter