added the possibility to re-size the window