run init() script on 'DOMContentLoaded' event, instead of direct call from html