added minimize option in the script