remove old register function