Added Validation and comments