2d code tested on cx2