changed req and res arguments