how to allocate functional expenses for nonprofits