making hashcode along with equals method