fixed task completion with sorting feature added