organized example code to use pipedream npm package