Added var_block to function