simplified and added checkpoint class