pickle creation and testing