adding checkpoint functions.