initial test; split out onload function to be called separately from page to make it testable - more work needed