making the api a little more OOP friendly