works now as a script, add support for ctrl-c and argument