Add implementation of dispatching function