Validated original  code