committing plot and code for Q6