Basic Sort functionality done