Added sorting algorithms to csp