Added method resize

Resizes the window