update comparator and observer