working publish/unpublish button