finished implementing API