getKey method