CG hw2 seems ok

todo refactoring