add function to select subset of dictionary given a list of keys