KeyCalculator now uses hash function to create keys