Add get_by_key method