added functionality to easily add to popout window