implement hash on declarations