move the add observer to object init time