added enum validation