added contents_update function