add hw10 direct code