registration and validation