modify algorithms