alternative approach to capture

here we extend the return value of capture with a module that carries
stdout, stderr and exit_status