Forgot to implement in api.cpp