refactored the tests to include another matrix, refactored the js to include multiple numbers