added methods for each api call and associated tests