work on better popup positioning