implemented valid-values-for function