updated to work with simulation output