isSortCompleted variable added