logic fixed