Update HW5.R