Peterson-Stockmeyer algorithm added