how does this work? innerKb is of type Key? Will this compile if you say: val k = innerKb._1? I think this might be using match and might fail at runtime if innerKb is not a tuple2 at runtime.