merkle algorithm works with the sample input