main code upload