moved post and vote saving to transaction