updated code to use new version of kryo