work on reading in identity file.  refactor switch init.