partition functions for small