added gold function