committing swapping and deleting tutorial