Implement sorting + specs