updated to make the pop up work