only create an observer if needed