add the cs update function