macAlgorithms