reworked design, added ILP code