* fix bugs
* calculate determinant either user log_balance or via quad matrices