Changed key-adding method.