added publish/unpublish/delete function