Modify main to feed x pattern