moved API class into this package