Double Mainloop count to reduce number of message passings