extended function to edit, delete and publish