remove register function