updated to use api rather than jellyfish