reg solver