updated api controller