added data validation scheme