modified nokogiri check to find the correct elements