change double equals to equals() to prevent pointer comparisons