working on sortfile