Update function in cherry plugin