this is a complete revamp of the script to a more pythonic way
it implements the new argument parser