use pointer to change the value on the fly.
continue improving code structure.