Now it generates sorted data