remove swp file
roughly implement all function