working on smarter list sort