quimp code added. rear intersect bug fix