implementing isValid configuration function