add delete device function