added logic to update last synced time