Basic Sort Algorithm