add method for use in iframe