Added popup functionality