experimental stage to test gui integration for upload function. VERY MESSY
cleaning...