validating and corrections