modifications for hashcode and equals for item types