working on CG method
working on datadriven