use "n choose k" formula