alter the logic