added sample sort