refactor restURL to avoid hard code