add visibility to dispatch function