added dynamic resizing
resize when the window first loads