almost good working version of cw
90 percent working cw