added pop up window functions