added test for dispatch