Implement sorting methods by modifying view and controller