implemented stage 1 of the URL routing functions