cleaned up validation