fixed some issues. There are further issues with building the A matrix and running the exponential