algorithms modified