adjustments to new geschihte middleware