Finished writing API - testing needed