Adding convenient method to call a block inside a transaction