changed tables names, improved hashCode and equals methods