Add data keeping code