added record keeping stuff