working away. Added registration code