  Hydrodynamical simulations of star formation often do not possess the dynamic
range needed to fully resolve the build-up of individual stars and star
clusters, and thus have to resort to subgrid models. A popular way to do this
is by introducing Lagrangian sink particles, which replace contracting high
density regions at the point where the resolution limit is reached. A common
problem then is how to assign fundamental stellar properties to sink particles,
such as the distribution of stellar masses.
  We present a new and simple statistical method to assign stellar contents to
sink particles. Once the stellar content is specified, it can be used to
determine a sink particle's radiative output, supernovae rate or other feedback
parameters that may be required in the calculations. Advantages of our method
are (i) it is simple to implement, (ii) it guarantees that the obtained stellar
populations are good samples of the initial mass function, (iii) it can easily
deal with infalling mass accreted at later times, and (iv) it does not put
restrictions on the sink particles' masses in order to be used. The method
works very well for sink particles that represent large star clusters and for
which the stellar mass function is well sampled, but can also handle the
transition to sink particles that represent a small number of stars.
