added hashcode and equals method

not sure if hashcode works, will need to be tested later; right now it
just adds up all the blocks