Add some modes.
some change.
some chagnes
Add gtest case.