straight line optimization