adds popup engine logic
mend