finished the API, need to clean up re-rendering issues