added a console log of the results, tested code.