Support mode argument.
Fixed to pass match test.
Merge pull request #5 from hyoshida/support_mode_argument

Support mode argument.