Created a new method for dictionary sorting (solves upcase/downcase issue)