major revision - add api