class implementation; 2 popups broken