overhauling db stuff, checkpoint