add a dbupload script and fix some stuffs