removed req and refactored routes to handle params var