organize imports, add docs
fix broken time range query