added simple validation