adds routes script up to selection from database