simple validation procedure