added registration code