#4 add middleware and controllers