Add Duc Tran's source code for exercise 6