Add some APIs
Add tests with fixing bugs