Add: code for hw5.