using document function from devtools