moved series expansion searches to a separate function