refactor topic transactions to use maprules