updated/fixed validation flow