complete cms basic founction