Delete from both sides function