guard and some validation tests