Change register function