Is a function needed for this? There is extra overhead with function calls.