It sometimes works. Most test cases have been Correct.
Once again, seems to work
modularizing