first version of dispatch
test codes