object oriented conversion of API