added option to solve dual