remove root parameter from parse function, only the path and query string should be passed to this function.