read from a map