new function to determine wether the solution is correct or not. 7/9 Tests completed