fixed indention inconsistencies and improved abstraction of the statements that parse the url and call the function(**kwargs)