Created algorithm skeleton