popup functionality completed