changed to use window object to get blobb and url