reg function and  init user data
modify inuse return data