how is gold formed flowchart