add popup handler