Updated for 0.1.3 with 'output' option