added tests for hash and created the degree calc method