revert logic change