add working determinant