added logic to distinguish between search with/without keyword
fixed urlbase