write most recent results
refactor sorting