add record / replay foundation