added autocompletion and corrected orderring of resoults