finished api almost