all API done, needs more tests though