middleware demo