add other two algorithms