fixed up validation