reorganised the uploading process + added sandbox temp table