added pickel test and removed unused code