move sort inside getters