Final Version s877-Duy_Nguyen.R