Added a simple function to test the algorithm
have all the elements included