added option to restore window position and size