added check for search params