untested code to write to the result form