ADDED a restart function based on how many merges can be made