remove unnecessary line from equals function