replaced pickle with cpickle to work on OSX