added the maximise functionality