add correct sorting to entries based on validity and strokes