comparewords works!!
worked for 2 hours, methods java iterates forever and I don't know why