First approach for the algorithm design