beginnings of document load listener