Added functions to CSprovider and ccontroller