Only use buffer if needed.
Replace unsigned* position with usigned& position.