added some tools and fixed some encoding