base prototype on the api an updated tests