sensitivity logic complete
fixed logic, merged