also do it for generate_coin