Added more tests
Use dispatch method to avoid code repetition