Rename observer to subscriber and add a special logic to exit the loop