put all registration code back in