Using the API instead of re-implementing