change compareName to .equals