Added save loop for inverse solution