Improve function for computing minor
Minor computing function improvements