simplify number of multiples
generic choose function