Tested low-level API, initial code for high-level API