improvements 

make the script check for options and then do things in a more efficient way.