add super fancy observer pattern and click handler for popup menu