Refactor regex and route logic to take additional (optional) parameter: a non random nth child