added array support
fixed arraybug
added check for opts
Merge pull request #1 from thorning/master

added array support to formats