replaced det calculation reference