change window title and add error check
initialize window parameters at the constructor of the window object