add separate function for generating coins