new data uploading, better codebook training