we added in the function to check if the results are physically possible