pass blocks to expressions and fix loop