some codes optimize