replace Hash::[] code