add setup middleware