sorting and capping predictions