IMPROVED: sorted files