added newspaper sort test and refactored sorting