Adding str and equals method for object comparisons