add inMemory option
Merge pull request #3 from maxogden/inmemoryopt

add inMemory option