updated iframe updating system to a more sophosticated one