fixing steepest descent bugs