Added dom_for_record method