redo cw function to be consistent with fish version
remodel fish style