Generalized key reading
further generalization of key read
passing metadata instead of a million arguments