substantial expansion of documentation; added distinct() feature