finished API (still need to write updated unit tests)