readability changes on validation code