feature sort by title/modified && remove duplicate code