refactored parameter extraction
more explicit uri test