updated to allow use additional api object