multistep gradient optimizations