fixed typo in equals fuction