implemented some validation