reduce memory usage
Merge pull request #3 from ponty/memory_usage

reduce memory usage