add delete instance functionality