api almost complete