cherrypicked :) version with older execution scheme for reference