add tools and minor fixes
minor fixes