fixed search issue and moved countries  js to separate file