some improvements for cms