added code for last question
generated md from latest code
latest code