lower call overhead by passing pointers