script dynamically creates and adds needed DOM elements