added equals method to Field class