Fixed bug, added environment variable that is passed to the edge function