update homework 2 with class 3 stuffs + Dimitri's version