again, altered the route handling for the optional trailing slash