added document prefix to get-elements script