fixed sorting bug
reduced http calls