added a few ends to fix merge deletions