rewrote hashcode using jdk7 methods.  added test method (main)