in progress -- converting to using API