Wasteful allocation of this function. Create it once and store it in a field.