added local variables for every line and pickling
using thread, wrapping
separate thread,unwrap,auto unwrap,dynamic function name,added settrace to wrapper