moved more things out of optimize_slip