improved version of DispatchAction implementation