begin process of modularizing coin functions