added equals method and getId