generalized pluralize function