Added base middleware