Updated working version with yts.re/api