added more functionality (distinct incomplete)