adding registration function, then upload