improved api interface