added sorting and num of results