Added some methods for api.