first version of api class