Adding preDispatch