changed check in validate()