simplified middleware signature