equals method changes to address 1 error