working on checkpoint system