first cut of optimizer