week 9 sgn and determinant functions