extracted function
corrected spelling and added failing tests for whole URL
fixed failing test case for whole URL
added testcase for multiple occurances of same key
fixed failing test for multiple keys