added a few integrity checks + i need to add a flag for redoing all the thetas in the map