implemented function upload scan