made a lot of changes to cwt....