added simple  validation