changed code dealing with path variables in preparation for OAuth