adding packages and refactoring routes to use them