public SpellCheckerSuggestion[] findSuggestions(String word){
        boolean notSorted = true;
        SpellCheckerSuggestion temp;
        SpellCheckerSuggestion[] suggestions = new SpellCheckerSuggestion[10];

        int index = bsCheck(word).getIndex();

        // If word is at the beginning of a dictionary
        if (index <= 10){
            for (int i = 0; i < 10; i++) {
                suggestions[i] = new SpellCheckerSuggestion(wordsInDictionary[i], findNumOfSimilarChar(word, wordsInDictionary[i]));
            }
        }
        // If word is at the end of a dictionary
        else if (wordsInDictionary.length - index <= 10) {
            for (int i = 0; i < 10; i++) {
                suggestions[i] = new SpellCheckerSuggestion(wordsInDictionary[index-i-1], findNumOfSimilarChar(word, wordsInDictionary[index-i-1]));
            }
        }
        // If word is somewhere else
        else {
            // Look up 5 words before and after the given word
            for (int i = 0; i < 10; i++) {
                suggestions[i] = new SpellCheckerSuggestion(wordsInDictionary[index - 5 + i], findNumOfSimilarChar(word, wordsInDictionary[index - 5 + i]));
            }
        }
        // Sort suggestions using bubble sort to find the most suitable word
        while ( notSorted ) {
            notSorted = false;
            for(int j = 0;  j < suggestions.length - 1;  j++ ) {
                if ( suggestions[j].getNumOfSimilarChar() < suggestions[j+1].getNumOfSimilarChar() ){
                    temp = suggestions[j];
                    suggestions[j] = suggestions[ j+1 ];
                    suggestions[ j+1 ] = temp;
                    notSorted = true;
                }
            }
        }
        return suggestions;
    }