changed references to be identified with strings
added hashcode and equals to dc instance classes