Source Code for result retrieve and upload