modify register function