extract object oriented api to interface