create pop up function