peter's commit with db partially done