preparing for optimizer