added "main" method to be able to execute the script from command line