move logic to inner iframe