Added sorting and coloring