updated edit and delete way