add to_key method and commentary