validation check, errors fixed