fixes #8, optional params to dispatch() for cli testing