working copy of cp2 after chanjuan's modulization