fixed some logic for new programs