added beginning of a class for the algorithm