added '-o' option