Reverted Determinant calculation

previous change had it in a testing mode. This is actual determinant
calculation