fixed the search to allow searching ongoing, expired or both