function added to load dom document