Fixed dispatch method issue (still not completely correct I think),
added a few first test cases