update pickle tools and make tests work