move popup content infomration out to its own function