added registration

I'm not sure if this is intended, but avoid assignment in conditions, this loos really weird.