polish up firebase transactions