sort implemented, seg fault with 100000 records