finished reworking of cmsTool