refactor delete, wip