added start of code to simulate adjoint file