finishing up the top level API.