add sorting and limit