create callback for generic popup