fixed log_det sign, added functions to tutorial