Added code for calculating determinants of larger matrices