fixed parseAlgorithm