Change algorithm slightly and print progress