Added correct lastDeleting
Create Main logic