removed extraneous comments; updated handling of results where no display attribute is set