divided to sort and sync