optimizations
better timing statistics. need to refactor
added db::size()