more general work, added popup