Prototype algorithm finished