added submitAnswer method to API service