coding conventions, correction for date validation