changed diff algo control