Implement add_key method