shortened script, added argv version

shortened script, added argv version