add output path as kw option, simplify output structure