move transaction off current loop
should resolve and simplify many things
why didn't i do it this way from the beginning >_<