updated api: allocation