middleware working again