added sorting and commented out dma search