register function added