refactor delete view