update and publish functionality added