algorithme with interface