Works both by importing as module or just calling from command line