refactor pickCached method