Create basicalgorithm