enhanced registration
added code checking registration