code cleanup - not use EOF macro