Run algorithm