in-place function, not global var