added resize behavior in js contained within the html file