changes the popup to accept callbacks