ILA logic moved from MAIN