improve getting, tests, storage and querying