adding filter.
fix the sync bug and adding filter.