updated code and classDia