use pointer i/o reference for clarity